#coding=utf-8
'''
3.1. Rounding Numerical Values
'''
print(round(1.23, 1))
print(round(1.27, 1))
print(round(-1.27, 1))
print(round(-1.21, 1))
print(round(1.25361, 3))

a = 1627731
print(round(a, -1))
print(round(a, -2))
print(round(a, -3))

x = 1.23456
print(format(x, '0.2f'))
print(format(x, '0.3f'))
print('value is {:0.3f}'.format(x))